﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rmac.DataBase.Entity
{
    [SugarTable("MaterialIssue")]
    public class MaterialIssue
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true,IsIdentity =true)]
        public int Id { get; set; }

        /// <summary>
        /// 工单号
        /// </summary>
        [SugarColumn(ColumnDescription ="工单号")]
        public string NO { get; set; }

        /// <summary>
        /// 产品编码
        /// </summary>
        [SugarColumn(ColumnDescription = "产品编码")]
        public string InventoryID { get; set; }

        /// <summary>
        /// 日期
        /// </summary>
        [SugarColumn(ColumnDescription = "日期")]
        public DateTime? Date { get; set; }

        /// <summary>
        /// 批号
        /// </summary>
        [SugarColumn(ColumnDescription = "批号")]
        public string ProjectBatch { get; set; }

        /// <summary>
        /// 车间
        /// </summary>
        [SugarColumn(ColumnDescription = "车间")]
        public string DeskStock { get; set; }

        /// <summary>
        /// 单据类型
        /// </summary>
        [SugarColumn(ColumnDescription = "单据类型")]
        public string EviType { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(ColumnDescription = "状态")]
        public string Status { get; set; }

        [Navigate(NavigateType.OneToMany, nameof(MaterialIssueChild.Pid))]
        public List<MaterialIssueChild> FG_InvChild { get; set; }

        [Navigate(NavigateType.OneToMany, nameof(MaterialIssueChildBatch.Pid))]
        public List<MaterialIssueChildBatch> FG_InvChildBatch { get; set; }
    }
}
